<template>
    <view>
        <template v-for="(item, index) in fVideoVolumeList">
            <j-cell-group :key="index" :title="'通道' + index">
                <j-cell title="音频模式" :tips="item.AudioMode" :more="false"></j-cell>
                <j-cell title="左声道" :tips="item.LeftVolume" :more="false"></j-cell>
                <j-cell title="右声道" :tips="item.RightVolume" :more="false"></j-cell>
                <j-cell title="静音" :more="false">
                    <view slot="tips">
                        <switch :checked="item.RightVolume !== 0" disabled></switch>
                    </view>
                </j-cell>
            </j-cell-group>
        </template>
    </view>
</template>

<script>
export default {
    data() {
        return {
            token: '',
            fVideoVolumeList: []
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
		this.token = options.token
		this.getVolume();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        getVolume() {
            uni.showLoading();
            let token = this.token;
            let data = {
                Name: 'fVideo.Volume'
            };
            getApp().globalData.api.getconfig(data, token, (result) => {
                uni.hideLoading({
                    success: (res) => {
                        console.log(result);
                        this.fVideoVolumeList = result['fVideo.Volume']
                    }
                });
            });
        }
    }
};
</script>
<style></style>
